import { createRouter, createWebHistory } from 'vue-router'
import RegisterView from '../components/RegisterView.vue'
import LoginView from '../components/LoginView.vue'
import IndexView from '../components/IndexView.vue'
import Appointment from '../components/Appointment.vue'


const routes = [
  { path: '/', redirect: '/loginview' },
  { path: '/registerview', component: RegisterView },
  { path: '/loginview', component: LoginView },
  { path: '/indexview', component: IndexView },
  {
    path: '/appointment',
    name: 'appointment',
    component: () => import('../components/appointment.vue')
  },
  {
    path: '/hospital',
    name: 'hospital',
    component: () => import('../components/hospital.vue')
  },
  {
    path: '/reportlist',
    name: 'reportlist',
    component: () => import('../components/reportlist.vue')
  },
  {
    path: '/report',
    name: 'report',
    component: () => import('../components/report.vue')
  },
  {
    path: '/selectdate',
    name: 'selectdate',
    component: () => import('../components/selectdate.vue')
  },
  {
    path: '/appointmentcancel',
    name: 'appointmentcancel',
    component: () => import('../components/appointmentcancel.vue')
  },
  {
    path: '/appointmentlist',
    name: 'appointmentlist',
    component: () => import('../components/appointmentlist.vue')
  },
  {
    path: '/appointmentsuccess',
    name: 'appointmentsuccess',
    component: () => import('../components/appointmentsuccess.vue')
  },
  {
    path: '/confirmorder',
    name: 'confirmorder',
    component: () => import('../components/confirmorder.vue')
  },
  {
    path: '/setmeal',
    name: 'setmeal',
    component: () => import('../components/setmeal.vue')
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router